import React, { FC } from "react";
import Title from "../../../components/QuestionComponents/QuestionTitle/index";
import Input from "../../../components/QuestionComponents/QuestionInput/index";
import style from "./EditCanvasShow.module.scss";
import { Spin } from "antd";

type PropsType = {
  loading: boolean;
};

const EditCanvasShow: FC<PropsType> = (props) => {
  const { loading } = props;

  // 加载优化
  if(loading){
    return <div style={{textAlign : 'center' , marginTop : "24px"}}>
      <Spin />
    </div>
  }

  return (
    <div className={style.canvas}>
      <div className={style["out-box"]}>
        <div className={style.stopEvent}>
          <Title />
        </div>
      </div>
      <div className={style["out-box"]}>
        <div className={style.stopEvent}>
          <Input />
        </div>
      </div>
    </div>
  );
};

export default EditCanvasShow;
